import {defineConfig} from 'vite';
import react from '@vitejs/plugin-react';
import path from 'path';

// https://vitejs.dev/config/
export default defineConfig({
  base: '/project-page',
  plugins: [react()],
  resolve: {
    alias: {
      '@': path.resolve(__dirname,'./src')
    }
  },
  server: {
    host: 'localhost',
    port: 9000,
    open: true,
    proxy: {
      '/prod-api': {
        target: 'http://192.168.2.100:83',
        changeOrigin: true,
        // rewrite: (path)=>path.replace(/^\/prod-api/,'')
      }
    }
  }
});
